package com.xiao.spring.aop.aop_1_2;

import java.lang.reflect.Method;

import org.springframework.aop.MethodBeforeAdvice;

public class LogArgsService implements MethodBeforeAdvice {

	@Override
	public void before(Method method, Object[] args, Object target) throws Throwable {
		StringBuilder builder = new StringBuilder("方法前：");
		builder.append("method-").append(method.getName());
		builder.append(";参数名").append(args.toString());
		builder.append(";参数值").append(target.toString());
		System.out.println(builder.toString());
	}

}
